home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / Style.java < prev    next >
Text File  |  1998-06-30  |  2KB  |  71 lines

  1. /*
  2.  * @(#)Style.java    1.11 98/04/09
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20. package com.sun.java.swing.text;
  21.  
  22. import java.awt.Component;
  23. import com.sun.java.swing.event.ChangeListener;
  24. import com.sun.java.swing.event.ChangeEvent;
  25.  
  26. import java.util.Enumeration;
  27. import java.util.Hashtable;
  28.  
  29.  
  30.  
  31. /**
  32.  * A collection of attributes to associate with an element in a document.
  33.  * Since these are typically used to associate character and paragraph
  34.  * styles with the element, operations for this are provided.  Other
  35.  * customized attributes that get associated with the element will
  36.  * effectively be name-value pairs that live in a hierarchy and if a name
  37.  * (key) is not found locally, the request is forwarded to the parent.
  38.  * Commonly used attributes are seperated out to facilitate alternative
  39.  * implementations that are more efficient.
  40.  *
  41.  * @author  Timothy Prinzing
  42.  * @version 1.11 04/09/98
  43.  */
  44. public interface Style extends MutableAttributeSet {
  45.  
  46.     /**
  47.      * Fetches the name of the style.   A style is not required to be named,
  48.      * so null is returned if there is no name associated with the style.
  49.      *
  50.      * @return the name
  51.      */
  52.     public String getName();
  53.  
  54.     /**
  55.      * Adds a listener to track whenever an attribute
  56.      * has been changed.
  57.      *
  58.      * @param l the change listener
  59.      */
  60.     public void addChangeListener(ChangeListener l);
  61.  
  62.     /**
  63.      * Removes a listener that was tracking attribute changes.
  64.      *
  65.      * @param l the change listener
  66.      */
  67.     public void removeChangeListener(ChangeListener l);
  68.  
  69.  
  70. }
  71.